import request from '@/utils/request'
import { systemApi } from '@/utils/comm'

// 查询列表
export function listBanner(query) {
  return request({
    url: `${systemApi}/banner/list`,
    method: 'get',
    params: query
  })
}

// 查询详情
export function getBanner(id) {
  return request({
    url: `${systemApi}/banner/` + id,
    method: 'get'
  })
}

// 新增
export function addBanner(data) {
  return request({
    url: `${systemApi}/banner`,
    method: 'post',
    data: data
  })
}

// 修改
export function updateBanner(data) {
  return request({
    url: `${systemApi}/banner`,
    method: 'put',
    data: data
  })
}

// 删除
export function delBanner(ids) {
  return request({
    url: `${systemApi}/banner/` + ids,
    method: 'DELETE',
  })
}